package com.by.controller;

import com.by.common.bean.Page;
import com.by.common.bean.PageBean;
import com.by.common.bean.ResultBean;
import com.by.common.controller.BaseController;
import com.by.service.InquiryCustomerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author HY
 * @version 1.0
 * @description
 * @date 2025/3/3
 * @since JDK21
 */
@RestController
@Api(tags = "客户询价")
@RequestMapping("/api/inquiryCustomer")
public class InquiryCustomerController extends BaseController {

    @Autowired
    InquiryCustomerService inquiryCustomerService;


    @ApiOperation("客户询价查询")
    @GetMapping("/query")
    public ResultBean queryInquiryList(Page page){
        PageBean inquiryCustomerList = inquiryCustomerService.getInquiryCustomerList(page.getPage(), page.getPageSize());
        if (inquiryCustomerList!=null){
            return success("客户询价查询成功",inquiryCustomerList);
        }
        return fail("客户询价查询失败",null);
    }



}
